#include "Shm.hpp"
#include "Fifo.hpp"
#include <unistd.h>

int main()
{
    FileOperator writer(PATH,FIFO_FILE);
    writer.OpenForWrite();
    Shm shm(pathname,projid,USER);
   
    char* mem=(char*)shm.VirutualAddr();

    int index=0;
    for(char c='A';c<='Z';c++,index+=2)
    {
        sleep(1);
        mem[index]=c;
        mem[index+1]=c;
        sleep(1);
        mem[index+2]=0;

        writer.Wakeup();
    }
    
    writer.Close();
    return 0;
}